package myky.com.doctorapp.presenter

import io.reactivex.disposables.Disposable
import myky.com.doctorapp.entity.LogoutEntity
import myky.com.doctorapp.base.BasePresenterIm
import myky.com.doctorapp.base.RxSubscribe
import myky.com.doctorapp.contract.SettingActivityContract
import myky.com.doctorapp.model.SettingActivityModel

/**
 * Description:
 *
 * @author wuyangwuyang
 * Created by 2019/1/24 on 14:47
 */
class SettingActivityPresenter : BasePresenterIm<SettingActivityContract.View>(),SettingActivityContract.Presenter {


    private val settingActivityModel:SettingActivityModel=SettingActivityModel()

    override fun plogout() {

        settingActivityModel.logout().subscribe(object :RxSubscribe<LogoutEntity.PayLoadBean>(){
            override fun onSuccess(t: LogoutEntity.PayLoadBean?) {
                mView.showDataSuccess(t)
            }

            override fun onFailed(code: Int, msg: String?) {
            }

            override fun onSubscribe(d: Disposable) {
                addSubscription(d)
            }

        })
    }
}
